<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .img {
            width: 300px;
            height: 150px;
        }

        .box {
            padding-left: 150px;
        }

        span {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            display: inline-block;
            margin-left: 10px;
            background: #ccc;
        }

        .active {
            background: orange !important;
        }
    </style>
</head>

<body>
    <div id="app">
        
    </div>


    <script src="./js/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.25.0/axios.js"></script>
    <!-- axios -->
    <script>

        // 生命周期 ()
        new Vue({
            el: "#app",
            data: {
                
            },
            created() {
                // axios  GET请求没有参数
                // axios.('https://api-hmugo-web.itheima.net/api/public/v1/home/catitems').then(res => {
                //     console.log(res)
                // })

                // axios  GET请求有参数
                // axios.get('https://api-hmugo-web.itheima.net/api/public/v1/goods/search', {
                //     params: {
                //         query: "三星",
                        
                //     }
                // }).then(res => {
                //     console.log(res)
                // })

                // axios  POST请求没有参数
                // axios.post("https://api-hmugo-web.itheima.net/api/public/v1/users/wxlogin").then(res => {
                //     console.log(res)
                // })


                // axios  POST请求有参数
                // axios.post("https://api-hmugo-web.itheima.net/api/public/v1/my/orders/req_unifiedorder", {
                //     Authorization: "sdsfdg"
                // }).then(res => {
                //     console.log(res)
                // })




                // get  post  put  delete
                // get    获取数据    (搜索, 分页)
                // post   登录 (有参数)
                // put    修改 (有参数)
                // delete 删除 (有参数)
            }
        })
    </script>
</body>

</html>